/**
 * @param {number[]} nums
 * @return {number}
 */
 var findGCD = function(nums) {
    let minNum = Math.min(...nums)
    let maxNum = Math.max(...nums)
    let res = 1
    for(let i=2;i<=min;i++){
      if(minNum%i==0 && maxNum%i==0){
        res = i
      }
    }
    return res
  };